<script setup>
import { ref } from 'vue';
import { Edit, Delete } from '@element-plus/icons-vue';

const isTitle = ref(false);
</script>

<template>
  <el-card class="event-section">
    <template #header>
      <div class="event-title">
        <p>Events</p>
        <p class="time">December, 28</p>
      </div>
    </template>
    <el-scrollbar class="event-boxes" height="380px">
      <div class="event-grid">
        <div v-for="item in 16" :key="item" class="event-box">
          <div class="event-time">
            <span>December 10, 2020</span>
          </div>
          <div class="event-content">
            <p class="content-header">Testing</p>
            <p class="content-subheader">Prototyping</p>
            <p class="content-summery">summery</p>
          </div>
          <div class="event-footer">
            <el-button type="primary" :icon="Edit" circle />
            <el-button type="danger" :icon="Delete" circle />
          </div>
        </div>
      </div>
    </el-scrollbar>
  </el-card>
</template>

<style scoped lang="scss">
.event-section {
  flex: 2;
  overflow: hidden;
  height: 100%;
  display: flex;
  flex-direction: column;
}

.event-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.event-boxes {
  height: 100%;
  width: 100%;
}

.event-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 16px;
  padding: 16px;
}

.event-box {
  --main-color-card: #dbf6fd;
  border-radius: 30px;
  padding: 16px;
  background-color: var(--main-color-card);
}

.event-time {
  font-size: 14px;
  color: #666;
}

.event-content {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  font-size: 14px;
  color: #999;
  margin: 10px auto;
}

.content-header {
  font-size: 18px;
  font-weight: bold;
  color: #333;
}

.content-subheader {
  font-size: 16px;
  color: #666;
}

.content-summery {
  max-width: 250px;
  overflow: hidden;
}

.event-footer {
  margin-top: 20px;
  display: flex;
  justify-content: flex-end;
}
</style>
